home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-05
/
3mhs099.zip
/
SEND1.BAT
< prev
Wrap
DOS Batch File
|
1992-03-18
|
2KB
|
77 lines
REM 3+MHS Gateway - Send a mail message to 3+Mail via CMAIL
REM Parmameter %1 required
IF %1x == x GOTO Done
REM Send the message
CMAIL /s %1
REM Check Errorlevels
IF Errorlevel 18 GOTO Done
IF Errorlevel 17 GOTO ServerNoRespond
IF Errorlevel 16 GOTO Done
IF Errorlevel 15 GOTO InvalidUser
IF Errorlevel 14 GOTO UnregisteredUser
IF Errorlevel 13 GOTO Done
IF Errorlevel 12 GOTO Done
IF Errorlevel 11 GOTO Done
IF Errorlevel 10 GOTO Done
IF Errorlevel 9 GOTO Done
IF Errorlevel 8 GOTO FileNotFound
IF Errorlevel 7 GOTO Done
IF Errorlevel 6 GOTO ErrorOpeningFile
IF Errorlevel 5 GOTO Done
IF Errorlevel 4 GOTO Done
IF Errorlevel 3 GOTO Done
IF Errorlevel 2 GOTO Done
IF Errorlevel 1 GOTO Done
GOTO Success
REM Errorlevels returned by CMail (+ == Trapped by 3MHS.EXE, * = Check here)
REM *0: No error
REM 1: (/r oe /ra) no messages to retrieve - not an error
REM 2: too many '/' parameters for this operation
REM 3: unrecognized '/' parameter
REM 4: duplicate '/' parameter
REM 5: not used
REM *6: (/s or /a) error opening message file
REM 7: file name not supplied where required
REM *8: message file or attachment could not be found
REM 9: directory path not supplied
REM 10: missing required '/' parameter
REM +11: (/s or /a) too many attachments - max is 26
REM +12: (/a) no recipients
REM +13: (/s or /a) too many recipients - max is 60
REM *14: (/s or /a) user not registered for mail service
REM *15: (/s or /a) not a valid user
REM 16: Miscellaneous error
REM *17: server not responding
:Success
REM Error 0: Successful transmission - Mark it for post-processing
RENAME %1 *.OK
GOTO Done
:ServerNoRespond
ECHO Error 17: 'Server not responding' when sending %1 >>ERROR.17
GOTO Done
:InvalidUser
ECHO Error 15: 'Not a valid user' when sending %1 >>ERROR.15
GOTO Done
:UnregisteredUser
ECHO Error 14: 'User not registered for mail service' when sending %1 >>ERROR.14
GOTO Done
:FileNotFound
REM Error 8: Unsuccessful transmission - Mark it for post-processing
RENAME %1 *.FNF
GOTO Done
:ErrorOpeningFile
ECHO Error 6: 'Error opening message file' when sending %1 >>ERROR.6
GOTO Done
:Done